package com.alibaba.datax.plugin.writer.miniowriter;

/**
 * @Author JDragon
 * @Date 2021.07.12 下午 5:02
 * @Email 1061917196@qq.com
 * @Des:
 */
public enum SupportType {
    XLXS("xlxs"),
    CSV("csv"),
    TXT("txt"),
    ;

    private String type;

    SupportType(String type) {
        this.type = type;
    }

    public static SupportType getType(String type) {
        for (SupportType value : SupportType.values()) {
            if (value.getType().equalsIgnoreCase(type)) {
                return value;
            }
        }
        throw new RuntimeException(String.format("不支持的保存格式:%s", type));
    }

    public String getType() {
        return type;
    }
}
